#include "animal.h"

#include <iostream>
#include <string>

using std::string;

namespace Animal {

Animal::Animal() : name("无名") {
  std::cout << "----- Animal() constructor -----" << std::endl;
}

Animal::Animal(string animalName) : name(animalName) {
  std::cout << "----- Animal(string) constructor -----" << std::endl;
}

Animal::~Animal() { std::cout << "----- Animal destructor -----" << std::endl; }

string Animal::Shout() {
  string res = "";
  for (int i = 0; i < ShoutTimes; i++) {
    res += getShoutSound() + " ";
  }
  return "我的名字是" + name + "，" + res;
}

string Animal::getShoutSound() { return "Ga"; }

}  // namespace Animal